#include <glib.h>

int main(int argc, char **argv) 
{
    gchar *str = NULL;
    gboolean ret = FALSE;

    g_print("glib_major_version:%d\n", glib_major_version);
    g_print("glib_minor_version:%d\n", glib_minor_version);
    g_print("glib_micro_version:%d\n", glib_micro_version);

    
    g_print("GLIB_MAJOR_VERSION:%d\n", GLIB_MAJOR_VERSION);
    g_print("GLIB_MINOR_VERSION:%d\n", GLIB_MINOR_VERSION);
    g_print("GLIB_MICRO_VERSION:%d\n", GLIB_MICRO_VERSION);

    str = (gchar *)glib_check_version(2, 70, 1);
    if(NULL != str) {
        g_print("str:%s \n", str);
    } else {
        g_print("GLib library is compatible with your given version(2.70.1) \n");
    }

    str = (gchar *)glib_check_version(2, 0, 1);
    if(NULL != str) {
        g_print("str:%s \n", str);
    } else {
        g_print("GLib library is compatible with your given version(2.0.1) \n");
    }

    ret = GLIB_CHECK_VERSION(2, 0, 1);
    g_print("GLib header files is %s than the given version(2.0.1) \n", 
        ret?"the same as or newer":"not same as or older");
    
    ret = GLIB_CHECK_VERSION(2, 56, 4);
    g_print("GLib header files is %s than the given version(2.56.4) \n", 
        ret?"the same as or newer":"not same as or older");

    ret = GLIB_CHECK_VERSION(2, 70, 0);
    g_print("GLib header files is %s than the given version(2.70.1) \n", 
        ret?"the same as or newer":"not same as or older");
    
    return 0;
}
